<?php

namespace org\copperforest\oak\resources;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Resource
 *
 * @author agama
 */
class Item extends ResponseNode
{
    
   
    public function __set( $name, $value )
    {
        if ( substr( $name, 0, 3 ) === 'id[' && substr( $name, -1, 1 ) === ']' ) {

            if ( !is_array( $this->id ) ) $this->id = array( );

            if ( substr( $name, 3, 1 ) == ']' ) $this->id[ ] = $value;
            else $this->id[ ( int ) substr( $name, 3, -1 ) ] = $value;
        }
    }

}
